package com.yc.ssq.servlet;

import com.yc.ssq.Util.Utils;
import com.yc.ssq.dao.SsqDao;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "ZztServlet", value = "/Zzt.s")
public class ZztServlet extends HttpServlet {

    SsqDao dao = new SsqDao();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String[] years =request.getParameterValues("year");
        String month = request.getParameter("month");
        Utils.writeJson(dao.selectZzt(years, month), response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
